using System;
using UnityEngine;

[Serializable]
public class DevelopersFriend : MonoBehaviour
{
	public AudioClip clip;

	public Camera mainCamera;

	public GameObject message;

	public GameObject buymessage;

	public GameObject badge;

	public GameObject buy;

	public void Start()
	{
		if (PlayerPrefs.GetInt("tmp") == 7)
		{
			badge.SetActiveRecursively(state: true);
		}
		else
		{
			buy.SetActiveRecursively(state: true);
		}
	}

	public void Update()
	{
		if (!Input.GetMouseButtonDown(0))
		{
			return;
		}
		RaycastHit hitInfo = default(RaycastHit);
		if (Physics.Raycast(mainCamera.ScreenPointToRay(UnityEngine.Input.mousePosition), out hitInfo, 100f))
		{
			if (hitInfo.collider.name == "S-T")
			{
				AudioSource.PlayClipAtPoint(clip, Camera.main.transform.position);
				message.SetActiveRecursively(state: true);
				StateManager.state = State.IAP;
			}
			if (hitInfo.collider.name == "Buy")
			{
				AudioSource.PlayClipAtPoint(clip, Camera.main.transform.position);
				buymessage.SetActiveRecursively(state: true);
				StateManager.state = State.IAP;
			}
		}
	}

	public void Main()
	{
	}
}
